﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace LogTest.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class LogController : ControllerBase
    {

        private ILogger<LogController> _logger;

        public LogController(ILogger<LogController> logger)
        {
            _logger = logger;
        }


        [HttpGet("test")]
        public IActionResult Test(string content)
        {
            _logger.LogInformation(content);
            _logger.LogDebug($"获取到请求，请求参数 content：{content},请求时间:{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
            return Ok();
        }

    }
}
